<?php
namespace app\api\controller;
use x\Xbase;
class H5 extends Xbase{
    public $view;
    //显示文章h5
    public function article($id){
        $info = $this->db->find('article',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }

    public function goodsdetail(){
        $id = $this->get('id');
        $rs = $this->db->query('select content from goods where id=? order by id asc',[$id],1);

        $d = [
            'info' => $rs,
        ];
        $this->fetch($d);
    }

    public function getword(){
        $id = $this->get('id');
        $rs = $this->db->query('select content from word where id=? order by id asc',[$id],1);

        $d = [
            'info' => $rs,
        ];
        $this->fetch($d);
    }

    //显示文章h5
    public function articledetail(){
        $id = $this->get('id');
        $info = $this->db->find('article',$id);
        $d = [
            'info' => $info,
        ];
        $this->fetch($d);
    }
}
